package com.woniu.mapper;

import com.woniu.been.entity.Courses;
import com.woniu.been.entity.UserCourse;
import com.woniu.been.entity.UserOrders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserCourseMapper {

    @Select("select * from user_course where user_id=#{userId}  AND course_id=#{courseId}")
    UserCourse  seletcCourseByUserID(UserCourse userCourse);

    @Select("SELECT * FROM courses WHERE course_id =#{courseId}")
    Courses findCourseById(UserCourse userCourse);


    // 根据订单编号 查订单的id orderNumber
    @Select("SELECT * FROM user_orders WHERE order_number =#{orderNumber}")
    List<UserOrders> getIds(UserOrders userorders);
}
